import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;


public class Ovelser {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		alist();
		set();

	}
	public static void alist(){
		ArrayList<Integer> a = new ArrayList<Integer>();
		for (int i = 0; i < 10; i++ ){
			a.add(i);
		}
		System.out.println(a.size());
		
		
		
		System.out.println(a.toString());
	}
	public static void set(){
		Set s = new HashSet();
		for (int i = 0; i < 10; i++){
			s.add(i);
		}
		System.out.println(s.size());
		System.out.println(s.toString());
	}
	
		
	}
	

